<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>ClaraGenomicsAnalysis: common/utils/include/claragenomics/utils/cudautils.hpp File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ClaraGenomicsAnalysis
   &#160;<span id="projectnumber">0.4.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_85effdddc426fd82e3610be0948fd413.html">utils</a></li><li class="navelem"><a class="el" href="dir_cbd0fd5fcc23422502de88d4fe6e7386.html">include</a></li><li class="navelem"><a class="el" href="dir_8e216217187728c84aa14a4942da12a2.html">claragenomics</a></li><li class="navelem"><a class="el" href="dir_657c9b9511f57ce884717ee8b069b43d.html">utils</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">cudautils.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;claragenomics/utils/cudaversions.hpp&gt;</code><br />
<code>#include &lt;<a class="el" href="logging_8hpp_source.html">claragenomics/logging/logging.hpp</a>&gt;</code><br />
<code>#include &lt;cuda_runtime_api.h&gt;</code><br />
<code>#include &lt;cassert&gt;</code><br />
</div><div class="textblock"><div class="dynheader">
Include dependency graph for cudautils.hpp:</div>
<div class="dyncontent">
<div class="center"><img src="cudautils_8hpp__incl.png" border="0" usemap="#common_2utils_2include_2claragenomics_2utils_2cudautils_8hpp" alt=""/></div>
<map name="common_2utils_2include_2claragenomics_2utils_2cudautils_8hpp" id="common_2utils_2include_2claragenomics_2utils_2cudautils_8hpp">
<area shape="rect" title=" " alt="" coords="196,5,341,61"/>
<area shape="rect" href="cudaversions_8hpp_source.html" title=" " alt="" coords="5,199,140,240"/>
<area shape="rect" href="logging_8hpp.html" title=" " alt="" coords="111,109,261,151"/>
<area shape="rect" title=" " alt="" coords="285,117,420,143"/>
<area shape="rect" title=" " alt="" coords="444,117,509,143"/>
<area shape="rect" title=" " alt="" coords="164,206,277,233"/>
</map>
</div>
</div>
<p><a href="cudautils_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classclaragenomics_1_1scoped__device__switch.html">claragenomics::scoped_device_switch</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">A class to switch the CUDA device for the current scope using RAII.  <a href="classclaragenomics_1_1scoped__device__switch.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:gaded61355db08f1d76bc24edc008d4224"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cudautils.html#gaded61355db08f1d76bc24edc008d4224">CGA_NVTX_RANGE</a>(varname,  label)</td></tr>
<tr class="memdesc:gaded61355db08f1d76bc24edc008d4224"><td class="mdescLeft">&#160;</td><td class="mdescRight">Dummy implementation for CGA_NVTX_RANGE macro.  <a href="group__cudautils.html#gaded61355db08f1d76bc24edc008d4224">More...</a><br /></td></tr>
<tr class="separator:gaded61355db08f1d76bc24edc008d4224"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader"></div></td></tr>
<tr class="memitem:ga161535c48fe399e086ac6277b527fb41"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cudautils.html#ga161535c48fe399e086ac6277b527fb41">CGA_CU_CHECK_ERR</a>(ans)</td></tr>
<tr class="memdesc:ga161535c48fe399e086ac6277b527fb41"><td class="mdescLeft">&#160;</td><td class="mdescRight">Log on CUDA error in enclosed expression.  <a href="group__cudautils.html#ga161535c48fe399e086ac6277b527fb41">More...</a><br /></td></tr>
<tr class="separator:ga161535c48fe399e086ac6277b527fb41"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3769a812992df47886894f48f26edf6f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__cudautils.html#ga3769a812992df47886894f48f26edf6f">claragenomics::cudautils::gpu_assert</a> (cudaError_t code, const char *file, int line)</td></tr>
<tr class="separator:ga3769a812992df47886894f48f26edf6f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ace0fde2c5420f52b40ca77276943ca"><td class="memTemplParams" colspan="2">template&lt;typename IntType , int32_t boundary&gt; </td></tr>
<tr class="memitem:a9ace0fde2c5420f52b40ca77276943ca"><td class="memTemplItemLeft" align="right" valign="top">__host__ __device__ __forceinline__ IntType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="cudautils_8hpp.html#a9ace0fde2c5420f52b40ca77276943ca">claragenomics::cudautils::align</a> (const IntType &amp;value)</td></tr>
<tr class="separator:a9ace0fde2c5420f52b40ca77276943ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="file_a9ace0fde2c5420f52b40ca77276943ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a9ace0fde2c5420f52b40ca77276943ca">&#9670;&nbsp;</a></span>align()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IntType , int32_t boundary&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">__host__ __device__ __forceinline__ IntType claragenomics::cudautils::align </td>
          <td>(</td>
          <td class="paramtype">const IntType &amp;&#160;</td>
          <td class="paramname"><em>value</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>align Alignment of memory chunks in cudapoa. Must be a power of two </p><dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">IntType</td><td>type of data to align </td></tr>
    <tr><td class="paramname">boundary</td><td>Boundary to align to (NOTE: must be power of 2) </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">value</td><td>Input value that is to be aligned </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Value aligned to boundary </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
